<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>按键修饰符</title>
	</head>
	<body>
		<div id="app">
			<!-- 1.按键访问修饰符，回车触发 
					keyup:键位弹起
					keydown:键位按下
					keypress:数字键盘-->
			
			回车触发:<input type="text" @keyup.enter="enter" />
			空格按下触发:<input type="text" @keydown.space="enter" />
			按键触发:<input type="text" @keyup.8="enter" />
		</div>
		<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
		<script>
			const app =new Vue({
				el: "#app",
				data: {
				
				},
				methods:{
					enter(){
						alert("搞我触发")
					}
				}
			})
		</script>
	</body>
</html>
